const data = {
  code: 0,
  data: [],
  dest: ''
}

const code = (e, value, list) => {
  switch (e) {
    case 'SUCCESS':
      data.code = 0
      break;
    case 'WARNING':
      data.code = 1001
      break;
    case 'ERROR':
      data.code = 9999
      break;
    default:
      break;
  }
  data.dest = value
  data.data = list || []
  return data
}




module.exports = code